#ifndef DISPLAYOBJECT_HPP
#define DISPLAYOBJET_HPP

#include <SDL/SDL.h>
#include <string>
#include "EventDispatcher.hpp"

class DisplayObject : public EventDispatcher 
{
public:    
    DisplayObject();
    virtual ~DisplayObject();
    virtual std::string toString(const std::string &more = "DisplayObject") const
    {
        TRACEIN;
        std::stringstream ss;
        ss << EventDispatcher::toString(more) << "\n";
        ss << "\trect.x: " << rect.x << "\n";
        ss << "\trect.y: " << rect.y << "\n";
        ss << "\trect.w: " << rect.w << "\n";
        ss << "\trect.h: " << rect.h << "\n";
        ss << "\tsurface: " << surface;
        TRACEOUT;
        return ss.str();
    }
   
protected:   
    bool visible;
    SDL_Rect rect;
    SDL_Surface *surface;
};

#endif 
